/**
 * 
 */
package com.worksmap.core.constant;

import java.util.HashMap;
import java.util.Map;

import com.worksmap.core.component.BaseConfig;

/**
 * 关于评价的常量都在这里
 * @author jack
 * 2013.12.18
 */
public class RateConstant {
	
	public static final String WORKSMAP_CENTER_DOMAIN = "worksmap.com";
	public static final String SELLER_SESSION_ID_NAME = "uid";
	public static final String SESSION_ID_NAME = "sessionid";
	public static final String SELLER_SESSION_ID_KEY = "!@#S!@#!@#!@#%$$%$%dfagFDF";
	
	//用获取的code和应用密钥（appSecret）通过POST方式换取token
	public static String tokenUrl = BaseConfig.getInstance().getString("tokenUrl", "");     
	public static String redirectUri = BaseConfig.getInstance().getString("redirectUri", "");
	public static String apiUrl = BaseConfig.getInstance().getString("apiUrl", "");
	public static String appkey = BaseConfig.getInstance().getString("appkey", "");
	public static String appSecret = BaseConfig.getInstance().getString("appSecret", "");
	public static String sessionKey = "";    //沙箱用户的sessionKey
	static{ 
		sessionKey = BaseConfig.getInstance().getString("sessionKey", "");
	}
	
	//淘宝消息服务，来自于http://open.taobao.com/doc/detail.htm?id=101663#sss0
	public static Map<String, Integer> TMC_MESSAGE = new HashMap<String, Integer>();
	static{
		TMC_MESSAGE.put("taobao_trade_TradeRated", 1);   	 //交易评价变更消息
		TMC_MESSAGE.put("taobao_trade_TradeSuccess", 2);     //交易成功消息
	}
	
	/**
	 * 订单情况
	 * 用户设置评价条件：
	 * 1.买家已评价 
	 * 2.所有交易成功 
	 */
	public static final String BUYER_RATE_ALREADY = "1";
	public static final String ALL_TRADE_SUCCESS = "2";
	
	/**
	 * 过滤黑名单,1开启,0关闭
	 */
	public static final int BLACK_LIST_SWITCH_OPEN = 1;
	
	
	
}
